<%@page contentType="text/html; charset=UTF-8"%>
<%@taglib uri="/WEB-INF/struts-tags.tld" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<style type="text/css">

.demo{width:180px; height:250px; border:2px solid #ccc; background:#eee; padding:10px; float:left;}
#demo1{position:absolute;z-index:100; margin-top:-10px;}
.demo a{text-decoration:underline; cursor:pointer}
.demo h3{font-size:14px}
.demo p{line-height:20px}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="/js/jquery.cookie.js"></script>
<script type="text/javascript" src="/js/jquery.scroll-follow.js"></script>
<script type="text/javascript">
$(function(){
	$("#demo1").scrollFollow({
		offset: 500
		
	});
});
function update(num){
	$("html,body").animate({scrollTop:$("#add-comment"+num).offset().top},1000);
}
var screenHeight =window.screen.height; //屏幕分辨率的高 
var screenWidth =window.screen.width; //屏幕分辨率的宽 
$("#demo1").offsetLeft=300;
$("#demo1").style.margin="100px";
</script>
</head>
<body>
<div id="demo1" class="demo">
     <h3>Demo 1</h3>
     <p><a href="javascript:update('111');">111</a></p>
     <p><a href="javascript:update('222');">222</a></p>
     <p><a href="javascript:update('333');">333</a></p>
     <p><a href="javascript:update('444');">444</a></p>
     <p><a href="javascript:update('555');">555</a></p>
</div>

<center>
<table border="1" width="1000" cellpadding="0" cellspacing="0" id="add-comment111">
	<tr>
		<td>1111111111111111
		<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
		</td>
	</tr>
</table>
<table border="1" width="1000" cellpadding="0" cellspacing="0" id="add-comment222">
	<tr>
		<td>22222222222222
		<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
		</td>
	</tr>
</table>
<table border="1" width="1000" cellpadding="0" cellspacing="0" id="add-comment333">
	<tr>
		<td>333333333333333333
		<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
		</td>
	</tr>
</table>
<table border="1" width="1000" cellpadding="0" cellspacing="0" id="add-comment444">
	<tr>
		<td>4444444444444444444
		<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
		</td>
	</tr>
</table>
<table border="1" width="1000" cellpadding="0" cellspacing="0" id="add-comment555">
	<tr>
		<td>555555555555
		<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
		</td>
	</tr>
</table>
<table border="1" width="1000" cellpadding="0" cellspacing="0">
	<tr>
		<td>dsafdasdsfasds
		<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
		</td>
	</tr>
</table>
<table border="1" width="1000" cellpadding="0" cellspacing="0">
	<tr>
		<td><a href="javascript:aaa();">aaa</a>
		<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
		</td>
	</tr>
</table>
</center>
</body>
</html>
